#include "cpu/exec/template-start.h"

#define instr test

static void do_execute(){
    DATA_TYPE res = op_src->val & op_dest->val;
    cpu.eflags.CF = 0;
    cpu.eflags.OF = 0;
    cpu.eflags.SF = res >> (DATA_BYTE*8 - 1);
    cpu.eflags.ZF = !res;
    int tag = 0;
    int i = 0;
    for(;i < 8;i++) tag += (res >> i) & 1;
    if(tag % 2) cpu.eflags.PF = 0;
    else cpu.eflags.PF = 1;
    print_asm_template2();
}

make_instr_helper(i2rm)
make_instr_helper(r2rm)

#include "cpu/exec/template-end.h"